package com.yjs.ppjokedemo.viewmodel;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import com.yjs.ppjokedemo.bean.PicProduct;
import com.yjs.ppjokedemo.repo.PicRepo;

import java.util.List;

public class PicViewModel extends ViewModel {

    PicRepo mPicRepo = new PicRepo();

    MutableLiveData<PicProduct> picProduct = new MutableLiveData<>();
    public LiveData<List<PicProduct>> getPicProducts(){
        return mPicRepo.getProducts();
    }

    public void setPicProduct(PicProduct picProduct){
        this.picProduct.setValue(picProduct);
    }

}
